<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function f(x) {
           x.innerHTML="<input type='text' name='username' value='zhangsan'/> <input type='text' name='hobby' value='read'/>"
            return true;
        }
    </script>
</head>
<body>
<form onsubmit="return f(this)">
    <input type="submit"/>
</form>
</body>
</html>